package com.hnu.web;

import com.hnu.model.User;

public class CollectBookmarkBean extends BaseAction {
	private static final long serialVersionUID = 8472128655610008645L;
	private long bookmarkId;
	private String message;
	private String query;
	
	public String collectBookmark()
	{
		User user = (User) this.session.get("user");
		long userId = user.getUserId();
		boolean result = this.servLocator.getBookmarkServ().collectBookmark(bookmarkId, userId);
		if(result)
		{
			this.message = "收藏成功！";
		}
		else
		{
			this.message = "你已收藏过该书签！";
		}
		return "success";
	}

	public long getBookmarkId() {
		return bookmarkId;
	}

	public void setBookmarkId(long bookmarkId) {
		this.bookmarkId = bookmarkId;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}

	public String getQuery() {
		return query;
	}

	public void setQuery(String query) {
		this.query = query;
	}

}
